home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
United Public Domain Gold 2
/
United Public Domain Gold 2.iso
/
education
/
pe023.dms
/
pe023.adf
/
ALGORHYTHMS
/
SOURCE
/
MENUS.C
< prev
next >
Wrap
C/C++ Source or Header
|
1988-10-05
|
17KB
|
446 lines
/* menus.c */
/* Copyright 1990 Thomas E. Janzen All Rights Reserved */
/*
** FACILITY:
**
** AlgoRhythms music improviser on Commodore (TM) Amiga (TM)
** compiled with Lattice (TM) C 5.05
**
** ABSTRACT:
**
** Algorhythms improvises music over the MIDI serial port.
**
** AUTHORS: Thomas E. Janzen
**
** CREATION DATE: 26-MAR-1990
**
** MODIFICATION HISTORY:
** DATE NAME DESCRIPTION
**--
*/
#include <intuition/intuition.h>
#include <graphics/text.h>
#include <proto/dos.h>
#include <proto/graphics.h>
#include <proto/exec.h>
#include <proto/mathffp.h>
#include <proto/intuition.h>
#define PROJTITLWID 68 /* width of project menu header */
#define FORMTITLWID 48 /* width of form menu header */
#define SCALETITLWID 48 /* width of scale title header */
#define PROJECTWIDTH (80+COMMWIDTH) /* width of project menu items */
#define FORMWIDTH (100+COMMWIDTH) /* width of form menu items */
#define SCALEWIDTH 125 /* width of scale menu items */
#define SUBWIDTH 106 /* width of form sub-menu items */
extern struct GfxBase *GfxBase;
extern struct IntuitionBase *IntuitionBase;
extern struct DOSBase *DOSBase;
extern struct MathBase *MathBase;
extern struct Window *w;
/*Voice items*/
const static char Voice15String[]="Voice 15";
const static struct IntuiText Voice15Txt={2,1,JAM1,0,0,NULL,Voice15String,NULL};
static struct MenuItem Voice15Item={NULL,0,120,80,8,
(ITEMTEXT|HIGHCOMP|ITEMENABLED),0,(APTR)&Voice15Txt,NULL,0,
NULL,0};
const static char Voice14String[]="Voice 14";
const static struct IntuiText Voice14Txt={2,1,JAM1,0,0,NULL,Voice14String,NULL};
static struct MenuItem Voice14Item={&Voice15Item,0,112,80,8,
(ITEMTEXT|HIGHCOMP|ITEMENABLED),0,(APTR)&Voice14Txt,NULL,0,
NULL,0};
const static char Voice13String[]="Voice 13";
const static struct IntuiText Voice13Txt={2,1,JAM1,0,0,NULL,Voice13String,NULL};
static struct MenuItem Voice13Item={&Voice14Item,0,104,80,8,
(ITEMTEXT|HIGHCOMP|ITEMENABLED),0,(APTR)&Voice13Txt,NULL,0,
NULL,0};
const static char Voice12String[]="Voice 12";
const static struct IntuiText Voice12Txt={2,1,JAM1,0,0,NULL,Voice12String,NULL};
static struct MenuItem Voice12Item={&Voice13Item,0,96,80,8,
(ITEMTEXT|HIGHCOMP|ITEMENABLED),0,(APTR)&Voice12Txt,NULL,0,
NULL,0};
const static char Voice11String[]="Voice 11";
const static struct IntuiText Voice11Txt={2,1,JAM1,0,0,NULL,Voice11String,NULL};
static struct MenuItem Voice11Item={&Voice12Item,0,88,80,8,
(ITEMTEXT|HIGHCOMP|ITEMENABLED),0,(APTR)&Voice11Txt,NULL,0,
NULL,0};
const static char Voice10String[]="Voice 10";
const static struct IntuiText Voice10Txt={2,1,JAM1,0,0,NULL,Voice10String,NULL};
static struct MenuItem Voice10Item={&Voice11Item,0,80,80,8,
(ITEMTEXT|HIGHCOMP|ITEMENABLED),0,(APTR)&Voice10Txt,NULL,0,
NULL,0};
const static char Voice9String[]="Voice 9";
const static struct IntuiText Voice9Txt={2,1,JAM1,0,0,NULL,Voice9String,NULL};
static struct MenuItem Voice9Item={&Voice10Item,0,72,80,8,
(ITEMTEXT|HIGHCOMP|ITEMENABLED),0,(APTR)&Voice9Txt,NULL,0,
NULL,0};
const static char Voice8String[]="Voice 8";
const static struct IntuiText Voice8Txt={2,1,JAM1,0,0,NULL,Voice8String,NULL};
static struct MenuItem Voice8Item={&Voice9Item,0,64,80,8,
(ITEMTEXT|HIGHCOMP|ITEMENABLED),0,(APTR)&Voice8Txt,NULL,0,
NULL,0};
const static char Voice7String[]="Voice 7";
const static struct IntuiText Voice7Txt={2,1,JAM1,0,0,NULL,Voice7String,NULL};
static struct MenuItem Voice7Item={&Voice8Item,0,56,80,8,
(ITEMTEXT|HIGHCOMP|ITEMENABLED),0,(APTR)&Voice7Txt,NULL,0,
NULL,0};
const static char Voice6String[]="Voice 6";
const static struct IntuiText Voice6Txt={2,1,JAM1,0,0,NULL,Voice6String,NULL};
static struct MenuItem Voice6Item={&Voice7Item,0,48,80,8,
(ITEMTEXT|HIGHCOMP|ITEMENABLED),0,(APTR)&Voice6Txt,NULL,0,
NULL,0};
const static char Voice5String[]="Voice 5";
const static struct IntuiText Voice5Txt={2,1,JAM1,0,0,NULL,Voice5String,NULL};
static struct MenuItem Voice5Item={&Voice6Item,0,40,80,8,
(ITEMTEXT|HIGHCOMP|ITEMENABLED),0,(APTR)&Voice5Txt,NULL,0,
NULL,0};
const static char Voice4String[]="Voice 4";
const static struct IntuiText Voice4Txt={2,1,JAM1,0,0,NULL,Voice4String,NULL};
static struct MenuItem Voice4Item={&Voice5Item,0,32,80,8,
(ITEMTEXT|HIGHCOMP|ITEMENABLED),0,(APTR)&Voice4Txt,NULL,0,
NULL,0};
const static char Voice3String[]="Voice 3";
const static struct IntuiText Voice3Txt={2,1,JAM1,0,0,NULL,Voice3String,NULL};
static struct MenuItem Voice3Item={&Voice4Item,0,24,80,8,
(ITEMTEXT|HIGHCOMP|ITEMENABLED),0,(APTR)&Voice3Txt,NULL,0,
NULL,0};
const static char Voice2String[]="Voice 2";
const static struct IntuiText Voice2Txt={2,1,JAM1,0,0,NULL,Voice2String,NULL};
static struct MenuItem Voice2Item={&Voice3Item,0,16,80,8,
(ITEMTEXT|HIGHCOMP|ITEMENABLED),0,(APTR)&Voice2Txt,NULL,0,
NULL,0};
const static char Voice1String[]="Voice 1";
const static struct IntuiText Voice1Txt={2,1,JAM1,0,0,NULL,Voice1String,NULL};
static struct MenuItem Voice1Item={&Voice2Item,0,8,80,8,
(ITEMTEXT|HIGHCOMP|ITEMENABLED),0,(APTR)&Voice1Txt,NULL,0,
NULL,0};
const static char Voice0String[]="Voice 0";
const static struct IntuiText Voice0Txt={2,1,JAM1,0,0,NULL,Voice0String,NULL};
static struct MenuItem Voice0Item={&Voice1Item,0,0,80,8,
(ITEMTEXT|HIGHCOMP|ITEMENABLED),0,(APTR)&Voice0Txt,NULL,0,
NULL,0};
const char ChannelMenuString[16]="Channel";
static struct Menu ChannelMenu =
{NULL,PROJTITLWID+FORMTITLWID+SCALETITLWID,0,
80,0,MIDRAWN|MENUENABLED,
ChannelMenuString,&Voice0Item};
/*Scale Menu */
const char ChromaticString[16]="Chromatic"; /* 11 */
const static struct IntuiText ChromaticTxt={2,1,JAM1,CHECKWIDTH,0,NULL,
ChromaticString,NULL};
static struct MenuItem ChromaticItem={NULL,0,0,CHECKWIDTH+129,8,
(CHECKIT|ITEMTEXT|HIGHCOMP|ITEMENABLED),0x07FE,
(APTR)&ChromaticTxt,NULL,0,NULL,0};
const char ShortPentaString[32]="Short Pentatonic"; /* 10 ;16letters*/
const static struct IntuiText ShortPentaTxt={2,1,JAM1,CHECKWIDTH,0,NULL,
ShortPentaString,NULL};
static struct MenuItem ShortPentaItem={&ChromaticItem,0,8,CHECKWIDTH+129,
8,(CHECKIT|ITEMTEXT|HIGHCOMP|ITEMENABLED),0x0BFE,
(APTR)&ShortPentaTxt,NULL,0,NULL,0};
const char HiraString[16]="hira joshi"; /* 9 */
const static struct IntuiText HiraTxt=
{2,1,JAM1,CHECKWIDTH,0,NULL,HiraString,NULL};
static struct MenuItem HiraItem={&ShortPentaItem,0,16,CHECKWIDTH+129,8,
(CHECKIT|ITEMTEXT|HIGHCOMP|ITEMENABLED),0x0DFE,
(APTR)&HiraTxt,NULL,0,NULL,0};
const char KumoiString[16]="kumoi joshi"; /* 8 */
const static struct IntuiText KumoiTxt={2,1,JAM1,CHECKWIDTH,0,NULL,KumoiString,
NULL};
static struct MenuItem KumoiItem={&HiraItem,0,24,CHECKWIDTH+129,8,
(CHECKIT|ITEMTEXT|HIGHCOMP|ITEMENABLED),0x0EFE,
(APTR)&KumoiTxt,NULL,0,NULL,0};
const char KokinString[16]="kokin joshi"; /* 7 */
const static struct IntuiText KokinTxt=
{2,1,JAM1,CHECKWIDTH,0,NULL,KokinString,NULL};
static struct MenuItem KokinItem={&KumoiItem,0,32,CHECKWIDTH+129,8,
(CHECKIT|ITEMTEXT|HIGHCOMP|ITEMENABLED),0x0F7E,
(APTR)&KokinTxt,NULL,0,NULL,0};
const char WholeToneString[16]="Whole Tone"; /* 6 */
const static struct IntuiText WholeToneTxt=
{2,1,JAM1,CHECKWIDTH,0,NULL,WholeToneString,NULL};
static struct MenuItem WholeToneItem={&KokinItem,0,40,CHECKWIDTH+129,8,
(CHECKIT|ITEMTEXT|HIGHCOMP|ITEMENABLED),0x00FBE,
(APTR)&WholeToneTxt,NULL,0,NULL,0};
const char DiatonicString[16]="Diatonic"; /* 5 */
const static struct IntuiText DiatonicTxt=
{2,1,JAM1,CHECKWIDTH,0,NULL,DiatonicString,NULL};
static struct MenuItem DiatonicItem={&WholeToneItem,0,48,CHECKWIDTH+129,8,
(CHECKIT|ITEMTEXT|HIGHCOMP|ITEMENABLED),0x00FDE,
(APTR)&DiatonicTxt,NULL,0,NULL,0};
const char HarmonicString[16]="Harmonic Minor"; /* 4 */
const static struct IntuiText HarmonicTxt=
{2,1,JAM1,CHECKWIDTH,0,NULL,HarmonicString,NULL};
static struct MenuItem HarmonicItem={&DiatonicItem,0,56,CHECKWIDTH+129,8,
(CHECKIT|ITEMTEXT|HIGHCOMP|ITEMENABLED),0x00FEE,
(APTR)&HarmonicTxt,NULL,0,NULL,0};
const char HungarianString[16]="Hungarian Minor"; /* 3 */
const static struct IntuiText HungarianTxt=
{2,1,JAM1,CHECKWIDTH,0,NULL,HungarianString,NULL};
static struct MenuItem HungarianItem={&HarmonicItem,0,64,CHECKWIDTH+129,8,
(CHECKIT|ITEMTEXT|HIGHCOMP|ITEMENABLED),0x00FF6,
(APTR)&HungarianTxt,NULL,0,NULL,0};
const char DiminishedString[16]="Diminished"; /* 2 */
const static struct IntuiText DiminishedTxt=
{2,1,JAM1,CHECKWIDTH,0,NULL,DiminishedString,NULL};
static struct MenuItem DiminishedItem=
{&HungarianItem,0,72,CHECKWIDTH+129,8,
(CHECKIT|ITEMTEXT|HIGHCOMP|ITEMENABLED),0x00FFA,
(APTR)&DiminishedTxt,NULL,0,NULL,0};
const char LongPentaString[16]="Long Pentatonic"; /* 1 */
const static struct IntuiText LongPentaTxt=
{2,1,JAM1,CHECKWIDTH,0,NULL,LongPentaString,NULL};
static struct MenuItem LongPentaItem=
{&DiminishedItem,0,80,CHECKWIDTH+129,8,
(CHECKIT|ITEMTEXT|HIGHCOMP|ITEMENABLED),0x00FFC,
(APTR)&LongPentaTxt,NULL,0,NULL,0};
const char TransposeString[16]="Transpose"; /* 0 */
const static struct IntuiText TransposeTxt=
{2,1,JAM1,0,0,NULL,TransposeString,NULL};
static struct MenuItem TransposeItem=
{&LongPentaItem,0,88,CHECKWIDTH+129,8,
(ITEMTEXT|HIGHCOMP|COMMSEQ|ITEMENABLED),
0,(APTR)&TransposeTxt,NULL,(BYTE)'T',NULL,0};
const char ScaleString[16]="Scale";
static struct Menu ScaleMenu =
{&ChannelMenu,PROJTITLWID+FORMTITLWID,0,
SCALETITLWID,0,MIDRAWN|MENUENABLED,
ScaleString,&TransposeItem};
/* Character menus */
const char MeanPeriodString[16]="Mean Period";
static struct IntuiText MeanPeriodTxt=
{2,1,JAM1,0,0,NULL,MeanPeriodString,NULL};
static struct MenuItem MeanPeriodItem={NULL,
FORMWIDTH-2,0,SUBWIDTH,8,
(ITEMTEXT|HIGHCOMP|ITEMENABLED),0,(APTR)&MeanPeriodTxt,
NULL,0,NULL,0};
const char MeanPhaseString[16]="Mean Phase";
const static struct IntuiText MeanPhaseTxt=
{2,1,JAM1,0,0,NULL,MeanPhaseString,NULL};
static struct MenuItem MeanPhaseItem={&MeanPeriodItem,
FORMWIDTH-2,8,SUBWIDTH,8,
(ITEMTEXT|HIGHCOMP|ITEMENABLED),0,(APTR)&MeanPhaseTxt,
NULL,0,NULL,0};
const char SpreadPeriodString[16]="Spread Period";
const static struct IntuiText SpreadPeriodTxt=
{2,1,JAM1,0,0,NULL,SpreadPeriodString,NULL};
static struct MenuItem SpreadPeriodItem={&MeanPhaseItem,
FORMWIDTH-2,16,SUBWIDTH,8,
(ITEMTEXT|HIGHCOMP|ITEMENABLED),0,
(APTR)&SpreadPeriodTxt,NULL,0,NULL,0};
const char SpreadPhaseString[16]="Spread Phase";
const static struct IntuiText SpreadPhaseTxt=
{2,1,JAM1,0,0,NULL,SpreadPhaseString,NULL};
static struct MenuItem SpreadPhaseItem={&SpreadPeriodItem,
FORMWIDTH-2,24,SUBWIDTH,8,
(ITEMTEXT|HIGHCOMP|ITEMENABLED),0,(APTR)&SpreadPhaseTxt,
NULL,0,NULL,0};
const char RandomizeString[16]="Randomize";
const static struct IntuiText RandomizeTxt=
{2,1,JAM1,0,0,NULL,RandomizeString,NULL};
static struct MenuItem RandomizeItem={&SpreadPhaseItem,
FORMWIDTH-2,32,SUBWIDTH,8,
(ITEMTEXT|HIGHCOMP|ITEMENABLED),0,(APTR)&RandomizeTxt,
NULL,0,NULL,0};
const char MaxVoicesString[]="Max Voices";
const static struct IntuiText MaxVoicesTxt={2,1,JAM1,0,0,NULL,
MaxVoicesString,NULL};
static struct MenuItem MaxVoicesItem={NULL,0,0,FORMWIDTH,8,
(ITEMTEXT|COMMSEQ|HIGHCOMP|ITEMENABLED),0,
(APTR)&MaxVoicesTxt,NULL,(BYTE)'V',NULL,0};
const char ReDrawString[8]="Redraw";
const static struct IntuiText ReDrawTxt={2,1,JAM1,0,0,NULL,ReDrawString,NULL};
static struct MenuItem ReDrawItem={&MaxVoicesItem,0,8,FORMWIDTH,8,
(ITEMTEXT|COMMSEQ|HIGHCOMP|ITEMENABLED),0,(APTR)&ReDrawTxt,
NULL,(BYTE)'R',NULL,0};
const char PulseString[16]="Pulse";
const static struct IntuiText PulseTxt={2,1,JAM1,0,0,NULL,PulseString,NULL};
static struct MenuItem PulseItem={&ReDrawItem,0,16,FORMWIDTH,8,
(ITEMTEXT|COMMSEQ|HIGHCOMP|ITEMENABLED),0,(APTR)&PulseTxt,NULL,
(BYTE)'N',NULL,0};
const char DurationString[16]="Duration";
const static struct IntuiText DurationTxt=
{2,1,JAM1,0,0,NULL,DurationString,NULL};
static struct MenuItem DurationItem={&PulseItem,0,24,FORMWIDTH,8,
(ITEMTEXT|COMMSEQ|HIGHCOMP|ITEMENABLED),0,(APTR)&DurationTxt,
NULL,(BYTE)'D',NULL,0};
const char PitchString[16]="Pitch";
const static struct IntuiText PitchTxt={2,1,JAM1,0,0,NULL,PitchString,NULL};
static struct MenuItem PitchItem={&DurationItem,0,32,FORMWIDTH,8,
(ITEMTEXT|HIGHCOMP|ITEMENABLED),0,(APTR)&PitchTxt,NULL,0,
&RandomizeItem,0};
const char RhythmString[16]="Rhythm";
const static struct IntuiText RhythmTxt={2,1,JAM1,0,0,NULL,RhythmString,NULL};
static struct MenuItem RhythmItem={&PitchItem,0,40,FORMWIDTH,8,
(ITEMTEXT|HIGHCOMP|ITEMENABLED),0,(APTR)&RhythmTxt,NULL,0,
&RandomizeItem,0};
const char DynamicString[16]="Dynamic";
const static struct IntuiText DynamicTxt={2,1,JAM1,0,0,NULL,DynamicString,NULL};
static struct MenuItem DynamicItem={&RhythmItem,0,48,FORMWIDTH,8,
(ITEMTEXT|HIGHCOMP|ITEMENABLED),0,(APTR)&DynamicTxt,NULL,0,
&RandomizeItem,0};
const static struct IntuiText TSpreadPhaseTxt=
{2,1,JAM1,0,0,NULL,SpreadPhaseString,NULL};
static struct MenuItem TSpreadPhaseItem={NULL,
FORMWIDTH-5,0,SUBWIDTH,8,
(ITEMTEXT|HIGHCOMP|ITEMENABLED),0,(APTR)&TSpreadPhaseTxt,
NULL,0,NULL,0};
const static struct IntuiText TSpreadPeriodTxt=
{2,1,JAM1,0,0,NULL,SpreadPeriodString,NULL};
static struct MenuItem TSpreadPeriodItem={&TSpreadPhaseItem,
FORMWIDTH-5,8,SUBWIDTH,8,
(ITEMTEXT|HIGHCOMP|ITEMENABLED),0,
(APTR)&TSpreadPeriodTxt,NULL,0,NULL,0};
const static struct IntuiText TRandomizeTxt=
{2,1,JAM1,0,0,NULL,RandomizeString,NULL};
static struct MenuItem TRandomizeItem={&TSpreadPeriodItem,
FORMWIDTH-2,16,SUBWIDTH,8,
(ITEMTEXT|HIGHCOMP|ITEMENABLED),0,(APTR)&TRandomizeTxt,
NULL,0,NULL,0};
const char TextureString[16]="Texture";
const static struct IntuiText TextureTxt={2,1,JAM1,0,0,NULL,TextureString,NULL};
static struct MenuItem TextureItem={&DynamicItem,0,56,FORMWIDTH,8,
(ITEMTEXT|HIGHCOMP|ITEMENABLED),0,(APTR)&TextureTxt,NULL,0,
&TRandomizeItem,0};
const char MaximumString[16]="Maximum";
const static struct IntuiText MaximumTxt=
{2,1,JAM1,0,0,NULL,MaximumString,NULL};
static struct MenuItem MaximumItem={NULL,FORMWIDTH-2,8,SUBWIDTH,8,
(ITEMTEXT|HIGHCOMP|ITEMENABLED),0,(APTR)&MaximumTxt,NULL,0,
NULL,0};
const char MinimumString[16]="Minimum";
const static struct IntuiText MinimumTxt={2,1,JAM1,0,0,NULL,
MinimumString,NULL};
static struct MenuItem MinimumItem={&MaximumItem,
FORMWIDTH-2,0,SUBWIDTH,8,
(ITEMTEXT|HIGHCOMP|ITEMENABLED),0,(APTR)&MinimumTxt,NULL,0,
NULL,0};
const char NoteLenString[16]="Note Length";
const static struct IntuiText NoteLenTxt={2,1,JAM1,0,0,NULL,
NoteLenString,NULL};
static struct MenuItem NoteLenItem={&TextureItem,0,64,FORMWIDTH,8,
(ITEMTEXT|HIGHCOMP|ITEMENABLED),0,(APTR)&NoteLenTxt,NULL,0,
&MinimumItem,0};
const char FormString[16]="Form";
static struct Menu FormMenu = {&ScaleMenu,
PROJTITLWID,0,FORMTITLWID,
0,(MIDRAWN|MENUENABLED),FormString,&NoteLenItem};
/*Project Menu*/
const char PlayString[16]="Play";
const static struct IntuiText PlayTxt={2,1,JAM1,0,0,NULL,PlayString,NULL};
static struct MenuItem PlayItem={NULL,0,0,PROJECTWIDTH,8,
(ITEMTEXT|COMMSEQ|HIGHCOMP|ITEMENABLED),0,(APTR)&PlayTxt,NULL,
(BYTE)'P',NULL,0};
const char StopString[16]="Stop";
const static struct IntuiText StopTxt={2,1,JAM1,0,0,NULL,StopString,NULL};
static struct MenuItem StopItem={&PlayItem,0,8,PROJECTWIDTH,8,
(ITEMTEXT|COMMSEQ|HIGHCOMP|ITEMENABLED),0,(APTR)&StopTxt,NULL,(BYTE)'S',
NULL,0};
const char ContinueString[16]="Continue";
const static struct IntuiText ContinueTxt={2,1,JAM1,0,0,NULL,
ContinueString,NULL};
static struct MenuItem ContinueItem={&StopItem,0,16,PROJECTWIDTH,8,
(ITEMTEXT|COMMSEQ|HIGHCOMP|ITEMENABLED),0,(APTR)&ContinueTxt,NULL,
(BYTE)'C',NULL,0};
const char LoadString[16]="Load";
const static struct IntuiText LoadTxt={2,1,JAM1,0,0,NULL,LoadString,NULL};
static struct MenuItem LoadItem={&ContinueItem,0,24,PROJECTWIDTH,8,
(ITEMTEXT|HIGHCOMP|COMMSEQ|ITEMENABLED),0,(APTR)&LoadTxt,NULL,(BYTE)'L',
NULL,0};
const char SaveString[16]="Save";
const static struct IntuiText SaveTxt={2,1,JAM1,0,0,NULL,SaveString,NULL};
static struct MenuItem SaveItem={&LoadItem,0,32,PROJECTWIDTH,8,
(ITEMTEXT|HIGHCOMP|COMMSEQ|ITEMENABLED),0,(APTR)&SaveTxt,NULL,
(BYTE)'F',NULL,0};
const char AboutString[16]="About";
const static struct IntuiText AboutTxt=
{2,1,JAM1,0,0,NULL,AboutString,NULL};
static struct MenuItem AboutItem={&SaveItem,0,40,PROJECTWIDTH,8,
(ITEMTEXT|HIGHCOMP|COMMSEQ|ITEMENABLED),0,(APTR)&AboutTxt,NULL,
(BYTE)'A',NULL,0};
const char QuitString[16]="Quit";
const static struct IntuiText QuitTxt={2,1,JAM1,0,0,NULL,QuitString,NULL};
static struct MenuItem QuitItem={&AboutItem,0,48,PROJECTWIDTH,8,
(ITEMTEXT|COMMSEQ|HIGHCOMP|ITEMENABLED),0,(APTR)&QuitTxt,NULL,(BYTE)'Q',
NULL,0};
const char ProjectString[16]="Project";
static struct Menu ProjectMenu = {&FormMenu,0,0,
PROJTITLWID,0,
MIDRAWN|MENUENABLED,ProjectString,&QuitItem};
void Init_Menu(void) {
SetMenuStrip(w,&ProjectMenu);
OnMenu(w,0);
}
int CheckMenu(int *class, int *code) {
register int TakeAction=0;
struct IntuiMessage *message;
TakeAction=0;
*class=0;
*code=0;
if(w->UserPort->mp_SigBit) {
message = (struct IntuiMessage *)GetMsg(w->UserPort);
if(message != NULL) {
*class = message->Class;
*code = message->Code;
ReplyMsg((struct Message *)message);
TakeAction=1;
}
return TakeAction;
}
}
void CloseMenu(void) {
ClearMenuStrip(w);
}